Conversation
Signed-off-by: Caleb Hulbert <cmhulbert@gmail.com>
With respect to incorporating IoPolicy, the semantics of these methods are not clear. (Did we not get a lock because locking is broken for the file system, or because someone else already holds a write lock?) These methods were only used in tests. For simplicity, we just remove them for now.
Make IoPolicy an enum that just communicates the intented locking behaviour (STRICT, PERMISSIVE, UNSAFE). How exactly this is implemented is up to the backend. For the FileSystemKeyValueAccess, the IoPolicy is simply to the FileKeyLockManager, then on to the FileLockState, and finally the ChannelLock, which actually implements the behaviour using FileLock (or not).
tpietzsch
added a commit
that referenced
this pull request
Mar 18, 2026
more or less copied from #211
Contributor
|
@tpietzsch based on our previous conversation, this PR can be closed for now, yes? |
Collaborator
Author
|
Yes 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes
IoPolicyanenumthat just communicates the intented locking behaviour (STRICT, PERMISSIVE, UNSAFE). How exactly this is implemented is up to the backend.For the
FileSystemKeyValueAccess, theIoPolicyis simply to theFileKeyLockManager, then on to theFileLockState, and finally theChannelLock, which actually implements the behaviour usingFileLock(or not).This mostly restores
FileSystemKeyValueAccessto the state beforeIoPolicy. (But I took care to preserve unrelated changes such as elimination of thefileSystemfield). Tests work again now, with allIoPolicysettings.